package com.banyuan.service.impl;

import com.banyuan.dao.impl.AccountDaoImpl;
import com.banyuan.domain.Account;
import com.banyuan.service.IAccountService;

import java.util.List;

public class AccountServiceImpl implements IAccountService {
    private AccountDaoImpl accountDao;

    public AccountDaoImpl getAccountDao() {
        return accountDao;
    }

    public void setAccountDao(AccountDaoImpl accountDao) {
        this.accountDao = accountDao;
    }

    @Override
    public int insert(Account account) {
       return accountDao.insert(account);
    }

    @Override
    public int update(Account account) {
        return accountDao.update(account);
    }

    @Override
    public int delete(Integer id) {
        return accountDao.delete(id);
    }

    @Override
    public List<Account> selectAll() {
       return accountDao.selectAll();
    }

    @Override
    public Account selectById(Integer id) {
        return accountDao.selectById(id);
    }
}
